package com.mmx.baseservice.system.tools.timer.task;

import com.mmx.baseservice.common.utils.LogUtil;
import com.mmx.baseservice.system.service.SysDbBackupService;
import com.mmx.baseservice.system.tools.timer.util.TimerExecuteUtil;
import org.quartz.JobExecutionContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("backDataTimer")
@EnableScheduling
public class BackDataTimer extends QuartzJobBean {

    @Resource
    private SysDbBackupService sysDbBackupService;


    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) {
        LogUtil.info("--------定时器自动备份--------");
//        TimerExecuteUtil.run(1, ()-> sysDbBackupService.add("定时器自动备份") );
    }
}
